package com.cyt.${moduleName?replace('/', '.')}.service;

import com.cyt.base.domain.vo.Result;
import com.cyt.base.domain.vo.ResultList;
import com.cyt.${moduleName?replace('/', '.')}.domain.dto.${entityName}Dto;
import com.cyt.${moduleName?replace('/', '.')}.domain.po.${entityName};
import com.cyt.${moduleName?replace('/', '.')}.domain.vo.${entityName}Vo;
import com.cyt.${moduleName?replace('/', '.')}.domain.vo.excel.${entityName}ImportVo;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * ${description}-service接口层
 *
 * @author ${authorName}
 * @date ${.now}
 */
public interface ${entityName}Service {

    /**
     * 分页查询${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @return PageInfo<${entityName}>
     * @author ${authorName}
     * @date ${.now}
     */
    PageInfo<${entityName}> findPage(${entityName}Dto ${entityName?uncap_first}Dto);

    /**
     * 分页查询${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @return PageInfo<${entityName}Vo>
     * @author ${authorName}
     * @date ${.now}
     */
    PageInfo<${entityName}Vo> findVoPage(${entityName}Dto ${entityName?uncap_first}Dto);

    /**
     * List查询${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @return List<${entityName}>
     * @author ${authorName}
     * @date ${.now}
     */
    List<${entityName}> findList(${entityName}Dto ${entityName?uncap_first}Dto);

    /**
     * List查询${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @return List<${entityName}Vo>
     * @author ${authorName}
     * @date ${.now}
     */
    List<${entityName}Vo> findVoList(${entityName}Dto ${entityName?uncap_first}Dto);

    /**
     * 对象查询${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @return ${entityName}
     * @author ${authorName}
     * @date ${.now}
     */
    ${entityName} findOne(${entityName}Dto ${entityName?uncap_first}Dto);

    /**
     * 对象查询${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @return ${entityName}Vo
     * @author ${authorName}
     * @date ${.now}
     */
    ${entityName}Vo findVoOne(${entityName}Dto ${entityName?uncap_first}Dto);

    /**
     * 保存${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @param userId 用户Id信息
     * @return Result<?>
     * @author ${authorName}
     * @date ${.now}
     */
    Result<?> add(${entityName}Dto ${entityName?uncap_first}Dto, String userId);

    /**
     * 更新${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @param userId 用户Id信息
     * @return Result<?>
     * @author ${authorName}
     * @date ${.now}
     */
    Result<?> update(${entityName}Dto ${entityName?uncap_first}Dto, String userId);

    /**
     * 批量逻辑删除${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @param userId 用户Id信息
     * @return Result<?>
     * @author ${authorName}
     * @date ${.now}
     */
    Result<?> remove(${entityName}Dto ${entityName?uncap_first}Dto, String userId);

    /**
     * 批量物理删除${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @return Result<?>
     * @author ${authorName}
     * @date ${.now}
     */
    Result<?> delete(${entityName}Dto ${entityName?uncap_first}Dto);

    /**
     * 下载导入模板
     *
     * @author ${authorName}
     * @date ${.now}
     */
    void downloadExcel(HttpServletResponse response);

    /**
     * 导入${description}
     *
     * @param file     参数传入对象
     * @param userId 用户Id信息
     * @return ResultList<${entityName}ImportVo>
     * @author ${authorName}
     * @date ${.now}
     */
    ResultList<${entityName}ImportVo> importExcel(MultipartFile file, String userId);

    /**
     * 导出${description}
     *
     * @param ${entityName?uncap_first}Dto 参数传入对象
     * @author ${authorName}
     * @date ${.now}
     */
    void exportExcel(HttpServletResponse response, ${entityName}Dto ${entityName?uncap_first}Dto);
}
